package com.fowo.api.model.logistics.channel.other.fees;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 物流渠道其他费用 导入导出辅助模型 */
@Getter
@Setter
public class LogisticsChannelOtherFeesExcelPo {

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属物流渠道")
  private String parentLogisticsChannelName;

  @ExcelIgnore
  @ExcelProperty(value = "所属物流渠道")
  private Long parentLogisticsChannel;

  @EnumsString(
    value = { "其他费用" },
    message = "费用类型的可用值为 “其他费用” 其中之一"
  )
  @Size(max = 50, message = "费用类型长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "费用类型")
  private String expenseType;

  @ExcelProperty(value = "费用")
  private Integer cost;

  @EnumsString(
    value = { "票", "KG(毛重)", "CBM(体积)" },
    message = "计价单位的可用值为 “票”, “KG(毛重)”, “CBM(体积)” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "计价单位")
  private String pricingUnit;
}
